<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/validate.jsp"%>
<%
    String reportNo = input.getDesc("reportNo","6193942");//报告单号
    String dangerNo = input.getDesc("dangerNo","");//获取危急值id

    HashMap<String, String> map2 = new HashMap<String, String>();
    map2.put("reportNo", reportNo);
    String json = HttpUtil.post("http://192.168.1.250:8080/check/show.jsp",map2);
    String hql  = "from Danger where dangerNo='" + dangerNo + "'";
    List<Danger> dangerList = QBuilder.db("basedb").queryHql(hql);

    Map map = JSON.parseObject(json,new TypeReference<Map>(){});

    List<Map> arrlist = (List<Map> )map.get("data");
    List<Map> templist = new ArrayList<Map>();
    List<Map> templist2 = new ArrayList<Map>();
    for(Map map1 :arrlist){
        String ResultDesiption = map1.get("ResultDesiption") == null ? "" : map1.get("ResultDesiption").toString();
        if("P".equals(ResultDesiption)){
            templist.add(map1);
        }else{
            templist2.add(map1);
        }
    }
    templist.addAll(templist2);
    msg.put("dangerList",dangerList);
    msg.put("data",templist);

    Tools.encryptPrint(out,msg.toJson());

%>
